<template>
	<view class="content">
		<u-empty v-show="showEmp" text="暂无数据" mode="list"></u-empty>
		<view @click="$to(`../looking-for-goods/looking-for-goods?status=赏金&retrieved=true&id=${item.id}`)" v-for="(item,index) in dataList" class="content-view f-c">
			<view class="">
				<image class="img" :src="$u.baseUrl+item.coverimg" mode=""></image>
			</view>

			<view class="themeColor">
				<view class="f30 bold mb20">{{item.title}}</view>
				<view class="f25 mb20">
					<text class="type">类别：{{item.goodstype.name}}</text>
					<text>价格：￥{{item.money}}</text>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataList: [],
			}
		},
		onLoad() {
			this.completed()
		},
		methods: {
			async completed(){
				const res=await this.$u.api.completed({id:this.vuex_user.id})
				this.dataList=res.data
				console.log(this.dataList);
				!res.success?this.showEmp=true:this.showEmp=false
			}
		}
	}
</script>

<style>
	.content-view {
		margin: 10rpx 30rpx;
		background-color: #D8D8D8;
		padding: 10rpx 20rpx;
	}

	.img {
		width: 150rpx;
		height: 150rpx;
		margin-right: 20rpx;
	}

	.type {
		margin-right: 30rpx;
	}
	.u-empty{
		margin-top: 100rpx!important;
	}
</style>
